<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">价格</label>
        <div class="layui-input-block">
            <input type="text" name="money" required lay-verify="required" placeholder="请输入价格" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否禁用</label>
        <div class="layui-input-block">
            <input type="checkbox" name="switch" value="1" lay-skin="switch" lay-text="启用|禁用" checked>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" name="seat" value="{$seat}">
            <input type="hidden" name="sid" value="{$sid}">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    layui.use(['form'],function () {
        let form = layui.form;

        form.on('submit(formDemo)',function (obj) {
            hadmin.http("{:url('saveSeatOpen')}",obj.field).then(res=>{
                if(res.code === 1){
                    hadmin.father_reload();
                }
            })
            return false;
        })
    })
</script>
